from com.mysqlconnection import mysql_connect
from  init_cs import dictfetchall
liststorage_sql='SELECT id,NAME,(SELECT instance_name FROM vm_instance WHERE id=instance_id) AS instance_name,volume_type,size,created,state FROM volumes WHERE state!= "Destroy";'

    
def get_all_storage_list():
    cnn=mysql_connect()
    cnn.execute(liststorage_sql)
    return dictfetchall(cnn)